﻿Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Xml
Imports System.Reflection


Partial Class 测站


    Public 编号 As String
    Public 经度 As String
    Public 纬度 As String



    Public Property 测段 As 测段

    Public Shared Function Paras(xxNode As XmlNode) As 测站

        Dim tmpClass As 测站 = New 测站()
        Dim nameList As XmlAttributeCollection = xxNode.Attributes

        For Each xxattribute As XmlAttribute In nameList

            Try

                Dim tmpType As Type = tmpClass.GetType()
                Dim tmpP As FieldInfo = tmpType.GetField(xxattribute.Name)
                tmpP.SetValue(tmpClass, xxattribute.Value)
            Catch ex As Exception

            End Try
        Next

        Return tmpClass

    End Function
End Class
